<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePrtMemberTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prt_member', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('lv_id')->default(0)->comment("[等级]会员等级");
            $table->string('username',100)->default("")->comment("会员名称");
            $table->string('nickname',100)->default("")->comment("昵称");
            $table->string('password',50)->default("")->comment("密码")->nullable();
            $table->string('salt',20)->default("")->comment("盐值")->nullable();
            $table->string('mobile',20)->default("")->comment("手机号");
            $table->string('email',100)->default("")->comment("邮箱");
            $table->string('avatar',255)->default("")->comment("头像")->nullable();
            $table->integer('birthday')->default(0)->comment("生日")->nullable();
            $table->string('bio',50)->default("")->comment("个性签名")->nullable();
            $table->decimal("balance", 10, 2)->default(0.00)->comment("余额");
            $table->integer('score')->default(0)->comment("积分")->nullable();
            $table->text("trust_conf")->comment("信任登录配置,json数据")->nullable();
            $table->string('token',30)->default('')->comment("认证token");
            $table->tinyInteger('status')->default(1)->comment('状态');

            $table->integer('created_at')->comment("创建时间")->nullable();
            $table->integer('updated_at')->comment("更新时间")->nullable();
            $table->integer('deleted_at')->default(null)->comment("删除时间")->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prt_member');
    }
}
